Skip to content

MWPW-195996: Flex card configurations updates#6302

Open
cmiqueo wants to merge 43 commits into
stagefrom
MWPW-195996
Open

MWPW-195996: Flex card configurations updates#6302
cmiqueo wants to merge 43 commits into
stagefrom
MWPW-195996

Conversation

@cmiqueo

@cmiqueo cmiqueo commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces flexCardHideFooter option with flexCardShowDateOnFooter to control date visibility on the flex card footer
  • Adds hidden and productName options to detailsTextOption, and a default option to flexCardTextAlign
  • Adds getProducts helper to fetch CaaS product tags when detailsTextOption is set to productName, passed through getConfig as products

Jira Ticket

Resolves: MWPW-195996

Changes

  • libs/blocks/caas-config/caas-config.js — updated flexCardTextAlign/detailsTextOption option labels; replaced "Hide Footer (CTA)" checkbox with "Show Date on Footer"
  • libs/blocks/caas/utils.js — added getProducts, wired products into getConfig output, renamed flexCardHideFooterflexCardShowDateOnFooter in config and default state
  • test/blocks/caas-config/expectedConfigs/defaultConfig.js, test/blocks/caas/utils.test.js — updated expected configs to include products: {}

Test plan

  • Verify CaaS Configurator UI shows "Show Date on Footer" checkbox and new text-align/details-text options
  • Verify flex card footer date renders correctly when the new checkbox is enabled
  • Verify detailsTextOption: 'productName' fetches and displays product names on cards
  • Unit tests added/updated

Test URLs
Before: https://main--milo--adobecom.aem.page/?martech=off
After: https://MWPW-195996--milo--adobecom.aem.page/?martech=off

milo-pr-merge Bot and others added 30 commits April 7, 2026 08:53
* Adds logic for the webClientVersion and susi success logging

* c2 changes

* tabindexes
* Safari sometimes gets the wrong window height

* Removing modal height update

* Removing all the resize logic

* Changes for c2
@aem-code-sync

aem-code-sync Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@cmiqueo cmiqueo self-assigned this Jul 15, 2026
@cmiqueo
cmiqueo requested review from jedjedjedM and sheridansunier and removed request for sanrai July 15, 2026 16:26
@cmiqueo cmiqueo added caas-configurator CaaS Configurator @caas labels Jul 15, 2026
@cmiqueo
cmiqueo temporarily deployed to milo_pr_merge July 15, 2026 16:26 — with GitHub Actions Inactive
@cmiqueo
cmiqueo temporarily deployed to milo_pr_merge July 15, 2026 16:26 — with GitHub Actions Inactive

@sanrai sanrai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. A couple of things to double-check:

Double-check these

  • defaultState is missing flexCardShowDateOnFooter: false. Every sibling flex prop has an explicit default; this one currently relies on undefined being falsy. Adding it keeps things consistent and safe if the include-guard logic ever changes.
  • The old flexCardHideFooter: false is still in defaultState but nothing reads it anymore (grepped the repo, it's dead after this rename). Let's remove it as part of the change.

Tests

  • The test changes only assert products: {} on the default configs. Could we add coverage for the new logic itself: the detailsTextOption === 'productName' branch calling getProducts and populating products, and flexCardShowDateOnFooter: true producing the flexCard block with showDateOnFooter: true? The renderer side is tested in caas, but milo's own getProducts/conditional-fetch path is currently untested.

@sheridansunier

Copy link
Copy Markdown
Contributor

Concern: flexCardTextAlign default value inconsistency

There's a three-way mismatch introduced by adding default: 'Default' to the flexCardTextAlign options:

  1. defaultState.flexCardTextAlign is still 'text-left' — so every fresh config opens with 'Left' pre-selected in the dropdown instead of 'Default'.

  2. The guard in utils.js still checks !== 'text-left' — so selecting the new 'Default' option (value 'default') makes 'default' !== 'text-left' = true, fires the guard, and emits flexCard.textAlign: 'default' into the output config. The renderer has no CSS for that value.

  3. Selecting 'Left' is a silent no-op — since 'text-left' is still the guard's noop sentinel, explicitly choosing 'Left' produces no output and the renderer falls back to its own default.

Suggested fix — two options:

  • (a) Keep 'text-left' as the true default: don't add a new 'default' key; just relabel 'text-left' back to 'Default' or leave it as 'Left' and drop the new entry.
  • (b) Migrate to 'default' as the noop: update defaultState.flexCardTextAlign to 'default' AND change the guard to !== 'default', and ensure the renderer treats 'default' as a no-op (or omit the key entirely when it equals 'default').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants